Layer SCSS to MergeStyles#3979
Conversation
| height: '100vh', | ||
| visibility: 'hidden' | ||
| } | ||
| ], |
There was a problem hiding this comment.
missing className at the end here.
There was a problem hiding this comment.
If we have a snapshot test, it would be great to update it and pass a className through so it shows up.
|
|
||
| const getClassNames = classNamesFunction<ILayerStyleProps, ILayerStyles>(); | ||
|
|
||
| // @customizable('Layer', ['theme']) |
There was a problem hiding this comment.
We need to uncomment this before checkin, maybe there is something we can do here?
There was a problem hiding this comment.
I see the old one didn't have it. I'm ok omitting it for now if we can't figure it out.
There was a problem hiding this comment.
This is commented out due to a bug, #3988. I'm leaving this commented out so it can be turned on later easily, but it's not blocking for this specific component because at least currently it does not need to use the theme.
| position: 'fixed', | ||
| zIndex: 1000000, | ||
| top: 0, | ||
| left: 0, |
There was a problem hiding this comment.
Left get changed to right automatically by getClassNames when the page is RTL. I don't believe this should impact anything but please just verify that it works in RTL.
There was a problem hiding this comment.
This looks fine in RTL mainly because the width is '100vw', so left:0 and right:0 are the same either way. The text automatically aligns to the right tho, but that's not part of this style set.
| const { getStyles, theme } = this.props; | ||
| const classNames = getClassNames(getStyles!, | ||
| { | ||
| theme: theme!, |
There was a problem hiding this comment.
this.props.className is never used, so that won't ever get added, even though it's in props and layerStyleProps
Pull request checklist
$ npm run changeDescription of changes
This is the conversion of the Layer component to mergeStyles. The theme was left commented out due to the customizable decorator conflicting with static functions in the Component, but was unused in the styles to begin with. Also ContextualMenu had a test using the Layer Component now calling LaybeBase.